﻿package Classes.Elements{
	import Classes.Elements.UnitType;	
	public class Unit extends Object{
		public var unitType:Object;
		public var interval:int;
		public var xpos:Number;
		public var ypos:Number;
		public var fireable:Boolean;
		public var condition:Number;
		
		public function Unit(ut:Object,interval:int,x:Number,y:Number,fireable:Boolean=true,condition:Number=0){			
			this.unitType	= ut;
			this.interval 	= interval;
			this.xpos 		= x;
			this.ypos 		= y;
			this.fireable 	= fireable;
			this.condition 	= condition;
		}
		static public function buildUnit(ut:Object,interval:int,x:Number,y:Number,fireable:Boolean=true,condition:Number=100):Unit{
			return new Unit(ut,interval,x,y,fireable,condition);
		}
	}
}